package cn.sue.example.three;

import android.content.Context;
import android.content.SharedPreferences;

import java.util.HashMap;
import java.util.Map;

public class SaveQQ {
    public  static  boolean UserInfo(Context context,String number, String passwoed){

        SharedPreferences sp = context.getSharedPreferences("data", Context.MODE_PRIVATE);
        SharedPreferences.Editor edit = sp.edit();
        edit.putString("username",number);
        edit.putString("uPassword",passwoed);
        edit.commit();

        return true;
    }

    public  static Map<String,String> getInfo(Context context){
        SharedPreferences sp = context.getSharedPreferences("data", Context.MODE_PRIVATE);
        String username = sp.getString("username", "");
        String uPassword = sp.getString("uPassword", "");
        Map<String,String> userMap=new HashMap<String,String>();
        userMap.put("name",uPassword);
        userMap.put("pwd",uPassword);
        return userMap;

    }
}
